home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q1082.dms / q1082.adf / src.lzh / Fig / arrow.c < prev    next >
C/C++ Source or Header  |  1991-07-18  |  2KB  |  79 lines

  1. /* 
  2.  *    FIG : Facility for Interactive Generation of figures
  3.  *
  4.  *    Copyright (c) 1985, 1988 by Supoj Sutanthavibul (supoj@sally.UTEXAS.EDU)
  5.  *    January 1985.
  6.  *    1st revision : August 1985.
  7.  *    2nd revision : March 1988.
  8.  *
  9.  *    %W%    %G%
  10. */
  11. #include "fig.h"
  12. #include "alloc.h"
  13. #include "object.h"
  14.  
  15. static float        forward_arrow_wid = 4;
  16. static float        forward_arrow_ht = 8;
  17. static int        forward_arrow_type = 0;
  18. static int        forward_arrow_style = 0;
  19. static float        forward_arrow_thickness = 1;
  20.  
  21. static float        backward_arrow_wid = 4;
  22. static float        backward_arrow_ht = 8;
  23. static int        backward_arrow_type = 0;
  24. static int        backward_arrow_style = 0;
  25. static float        backward_arrow_thickness = 1;
  26.  
  27. F_arrow *
  28. forward_arrow()
  29. {
  30.     F_arrow        *a;
  31.  
  32.     if (NULL == (Arrow_malloc(a))) {
  33.         put_msg(Err_mem);
  34.         return(NULL);
  35.         }
  36.     a->type = forward_arrow_type;
  37.     a->style = forward_arrow_style;
  38.     a->thickness = forward_arrow_thickness;
  39.     a->wid = forward_arrow_wid;
  40.     a->ht = forward_arrow_ht;
  41.     return(a);
  42.     }
  43.  
  44. F_arrow *
  45. backward_arrow()
  46. {
  47.     F_arrow        *a;
  48.  
  49.     if (NULL == (Arrow_malloc(a))) {
  50.         put_msg(Err_mem);
  51.         return(NULL);
  52.         }
  53.     a->type = backward_arrow_type;
  54.     a->style = backward_arrow_style;
  55.     a->thickness = backward_arrow_thickness;
  56.     a->wid = backward_arrow_wid;
  57.     a->ht = backward_arrow_ht;
  58.     return(a);
  59.     }
  60.  
  61. F_arrow *
  62. make_arrow(type, style, thickness, wid, ht)
  63. int    type, style;
  64. float    thickness, wid, ht;
  65. {
  66.     F_arrow        *a;
  67.  
  68.     if (NULL == (Arrow_malloc(a))) {
  69.         put_msg(Err_mem);
  70.         return(NULL);
  71.         }
  72.     a->type = type;
  73.     a->style = style;
  74.     a->thickness = thickness;
  75.     a->wid = wid;
  76.     a->ht = ht;
  77.     return(a);
  78.     }
  79.